package com.sumainfor.pc.gmio.controller.secretary;

import ch.qos.logback.core.status.OnPrintStreamStatusListenerBase;
import com.qiniu.util.Json;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.gmio.feign.Zfeign.ZpcMktFeign;
import com.sumainfor.pc.gmio.service.HoWaterMeterService;
import com.sumainfor.pc.gmio.service.SeWaterMeterExtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author zc
 * @ClassName SeWaterMeterExtController
 * @date 2019/11/21 15:09
 * @description: TODO
 */
@Controller
@RequestMapping("/SeWaterMeterExt")
public class SeWaterMeterExtController {

    @Autowired
    SeWaterMeterExtService seWaterMeterExtService;


    @Autowired
    HoWaterMeterService hoWaterMeterService;

    /**
     * 查询水费上一次的抄表数
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/getHouInfoMater")
    public JsonResult getHouInfoMater(@RequestBody Map<String, Object> params){
    return  hoWaterMeterService.getHouInfoMater(params);
    }




    /**
     * 服务管家查询需要记录抄表的水
     */
    @ResponseBody
    @PostMapping("/getWatMeterNum")
    public JsonResult getWatMeterNum(@RequestBody Map<String,Object> params, Pager pager){
        return seWaterMeterExtService.getWatMeterNum(params,pager);

    }

    /**
     * 秘书抄燃气的房源
     * @param params
     * @param pager
     * @return
     */
    @ResponseBody
    @PostMapping("/getWatSecretary")
    public JsonResult getWatSecretary(@RequestBody Map<String,Object> params, Pager pager){
        return seWaterMeterExtService.getWatSecretary(params,pager);
    }

    /**
     * 管家抄完房源生成账单
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/getWatBrowse")
    public  JsonResult getWatBrowse(@RequestBody Map<String,Object> params){
        return seWaterMeterExtService.getWatBrowse(params);
    }

    /**
     * 秘书抄水表账单
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/addWatClerk")
    public JsonResult addWatClerk(@RequestBody Map<String,Object> params){
        return seWaterMeterExtService.addWatClerk(params);
    }



    /**
     * 管家退租查上次燃气
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/getLastWatLease")
    public JsonResult getLastWatLease(@RequestBody Map<String,Object> params){
        return seWaterMeterExtService.getLastWatLease(params);
    }
}

